package com.bjpowernode.mvc.service.inter;

import cn.hutool.system.UserInfo;
import com.bjpowernode.db.domain.User;
import com.bjpowernode.db.result.UserAccountResult;
import com.bjpowernode.mvc.model.dto.user.TokenUserDTO;


public interface UserService {
    //按照手机号查用户
    User queryByPhone(String phone);

    //注册新用户
    int registerUser(String phone,String secret);

    //登录访问用户.
    User userLogin(String phone, String secret,String LoginIp);

    //uuid表示token
    String createToken();


    //存储用户和用户信息到token
    boolean saveTokenRedis(TokenUserDTO tokenUserDTO);

    //按照主键查用户
    User queryById(Integer userid);


    //实名认证.
    boolean hashRealname(Integer userid, String name, String iCard);


    //查询用户和账户
    UserAccountResult queryUserAccountInfo(Integer userId);



    //退出登录,删除token key
    boolean removeLoginToken(String key);
}
